﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Work.Domain
{
    /// <summary>
    /// 预约挂号信息
    /// </summary>
    public  class Appintment
    {
        /// <summary>
        /// 编号
        /// </summary>
        [Key]
        public int AppintmentId { get; set; }
        /// <summary>
        /// 挂号单
        /// </summary>
        public string? RegistrationNum { get; set; }
        /// <summary>
        /// 号类型
        /// </summary>
        public string? AppointmentType { get; set; }
        /// <summary>
        /// 医生
        /// </summary>
        public string? DoctorName { get; set; }
        
        /// <summary>
        /// 科室
        /// </summary>
        public string? Department { get; set; }
        /// <summary>
        /// 挂号费用
        /// </summary>
        public decimal? RegistrationFee { get; set; }
        /// <summary>
        /// 其他费用
        /// </summary>
        public decimal? OtherFee { get;set; }
        /// <summary>
        /// 挂号日期
        /// </summary>
        public DateTime? RegistrationDate { get; set; }
        /// <summary>
        /// 就诊日期
        /// </summary>
        public DateTime? VisitDate { get; set; }
        /// <summary>
        /// 就诊人编号
        /// </summary>
        public int PatientId { get; set; }
        /// <summary>
        /// 卡号 冗余，便于快速查询
        /// </summary>
        public string? CardNumber { get; set; }

        /// <summary>
        /// 病历状态（未就诊/已就诊）
        /// </summary>
        public string? RecordStatus { get; set; }

        // 导航属性
        /// <summary>
        /// 关联的病历信息
        /// </summary>
        public virtual MedicalRecord? MedicalRecord { get; set; }

        /// <summary>
        /// 关联的患者信息
        /// </summary>
        public virtual Patient? Patient { get; set; }
    }
}
